package com.hzcc.wechatpayback.module.controller;

import com.hzcc.wechatpayback.common.ResultResponse;
import com.hzcc.wechatpayback.config.WxPayConfig;
import io.swagger.annotations.Api;
import lombok.extern.log4j.Log4j;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author hzcc
 * @Date 2022/4/22
 *
 * 测试专用Controller
 */
@Api(tags = "测试专用Controller")
@RestController
@CrossOrigin
@Slf4j
@RequestMapping("/api/test")
public class TestController {

    @Resource
    private WxPayConfig wxPayConfig;

    @GetMapping
    public ResultResponse getWxPayConfig(){
        String mchId = wxPayConfig.getMchId();
        return ResultResponse.defaultSuccessResultResponse(mchId);
    }
}
